{# signup template #}
{% extends "base.html.twig" %}

{% block content %}
<div class="row">
    <div class="col-xs-12">
        <div id="login-box" class="login-box visible widget-box no-border">
            <div class="widget-body">
                <div class="widget-main">
                    <h4 class="header blue lighter bigger text-center">
                        Signup for Lahti Ski Games App Management
                    </h4>
                    <br/>
                    <form class="form-horizontal" method="post" action="{{ urlFor('new-user') }}">
                        <div class="form-group">
                            <label class="col-xs-3 col-xs-offset-1 control-label no-padding-right" for="email">Email</label>
                            <div class="col-xs-6 col-lg-4">
                                <span class="block input-icon input-icon-right">
                                    <input type="text" class="form-control" placeholder="Email" name="email" id="email" autofocus required />
                                </span>
                            </div>
                        </div>
                        <div class="form-group">
                            <label class="col-xs-3 col-xs-offset-1 control-label no-padding-right" for="password">Password</label>
                            <div class="col-xs-6 col-lg-4">
                                <span class="block input-icon input-icon-right">
                                    <input type="password" class="form-control" name="password" placeholder="Password" id="password" required/>
                                </span>
                            </div>
                        </div>
                        <div class="form-group">
                            <span class="lbl col-xs-3 col-xs-offset-1"> </span>
                            <div class="col-xs-6 col-lg-4">
                                <button type="submit" class="width-35 pull-right btn btn-sm btn-default btn-block">
                                    Sign Up
                                </button>
                            </div>
                        </div>
                        <div class="col-xs-12 text-center">Already have an account? <a href="{{urlFor('login')}}">Login</a>
                        </div>
                        {% if error is not empty %}
                            <h3 class="text-center"><span class="label label-danger">
                            {% if error == 1 %}
                            Check email
                            {% elseif error == 2 %}
                            Check password
                            {% endif %}
                            </span></h3>
                        {% endif %}
                    </form>
                </div>
            </div>
        </div>

    </div>
</div>
{% endblock %}